home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / game / patch / f18.lzh / f18fix.c < prev    next >
C/C++ Source or Header  |  1988-10-06  |  565b  |  31 lines

  1. /*
  2.  *    f18fix.c by Sean Casey, PUBLIC DOMAIN.
  3.  */
  4.  
  5. #include "fcntl.h"
  6.  
  7. main()
  8. {
  9.     char s[8], zero = 0;
  10.     char *fn = "df0:F-18 Interceptor";
  11.     int fp;
  12.  
  13.     puts("Insert copy of F-18 Interceptor into DF0: and press RETURN:\n");
  14.     gets(s);
  15.  
  16.     if ((fp = open(fn, O_RDWR)) < 0) {
  17.         puts("Couldn't open file \"DF0:F-18 Interceptor\"\n");
  18.         exit(-1);
  19.     }
  20.  
  21.     lseek(fp, (long) 0x1cd8d, 0);
  22.     write(fp, &zero, 1);
  23.     lseek(fp, (long) 0x1cd9d, 0);
  24.     write(fp, &zero, 1);
  25.     lseek(fp, (long) 0x1cdad, 0);
  26.     write(fp, &zero, 1);
  27.     lseek(fp, (long) 0x1cdbb, 0);
  28.     write(fp, &zero, 1);
  29.     close(fp);
  30. }
  31.